<div class="panel panel-default" ng-controller="PaymentListCtrl">
	<div class="panel-heading">
		订票管理 / 支付流水<span style="color:red">（包含已支付、已完成、退款中、已退款和退款失败的交易流水）</span>
	</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-4">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.tradeNo" class="form-control" placeholder="支付流水号">
				</div>
			</div>
			<div class="form-group col-md-4">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="paymentList.selected" theme="bootstrap">
							<ui-select-match placeholder="支付方式">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="pay in paymentList | propsFilter: {name: $select.search}">
								<span ng-bind-html=" pay.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="paymentList.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
						</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="starList.selected" theme="bootstrap">
							<ui-select-match placeholder="始发客运站">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="star in starList | propsFilter: {name: $select.search}">
								<span ng-bind-html=" star.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="starList.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
						</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-4" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control" datepicker-popup="{{format}}" is-open="opened" ng-model="timeRange.startTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="支付开始时间" readOnly /> <span class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-4" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control" datepicker-popup="{{format}}" is-open="opened" ng-model="timeRange.endTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="支付结束时间" readOnly /> <span class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="imList.selected" theme="bootstrap">
							<ui-select-match placeholder="车票类型">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="im in imList | propsFilter: {name: $select.search}">
								<span ng-bind-html=" im.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="imList.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
						</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-1">
				<div class="col-md-11">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
				</div>
			</div>
		</form>
	</div>
	<p ng-show="flag" class="m-l-xl">
		当前总共：{{totalCount | defaultValue: 0}}条数据 &nbsp;
		应付金额：{{charge | number:2 | defaultValue: 0.00}}元 &nbsp;
		支付金额：{{pay | number:2 | defaultValue: 0.00}}元 &nbsp;
		保险金额：{{insurances | number:2 | defaultValue: 0.00}}元 &nbsp;
		票数：{{tickets | defaultValue: 0}}张
	</p>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th style="width:10px;"></th>
					<th style="width:70px;">支付流水号</th>
					<th style="width:70px;">订单号</th>
					<th style="width:70px;">支付方式</th>
					<th style="width:80px;">支付用户姓名</th>
					<th style="width:80px;">订单总金额</th>
					<th style="width:80px;">已支付金额</th>
					<th style="width:80px;">支付时间</th>
					<th style="width: 70px;">
						<a href tooltip="excel导出" has-authority="BOOKING_PAYMENT_EXPORT">
							<i class="fa fa-download" ng-click="exportExcel()"></i>
						</a>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="pay in dataList">
					<td></td>
					<td>{{pay.tradeNo}}</td>
					<td>{{pay.orderNo}}</td>
					<td>{{pay.paymentId | paymentFilter}}</td>
					<td>{{pay.name}}</td>
					<td>{{pay.charge| number:2}}</td>
					<td>{{pay.pay | number:2}}</td>
					<td>{{pay.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
					<td></td>
				</tr>
				<tr ng-show="dataList==''">
					<td colspan="9" style="text-align: center;">暂无支付信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>